package com.tairan.chapter.feigin.provider.controller;

import com.tairan.chapter.feign.api.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController implements HelloService {

    @Autowired
    private Environment environment;

    @Override
    public String getMessage() {
        return environment.getProperty("spring.application.name") + ":" + environment.getProperty("server.port", "8080");
    }
}
